export interface ResponseData {
   code: number,
   message: string,
   ok: boolean
}

// 账号信息的ts类型
export interface User {
   id?: number,
   createTime?: string,
   updateTime?: string,
   username: string,
   password: string,
   name: string,
   phone?: null,
   roleName?: string
}
// 数组包含全部的用户信息
export type Records = User[]
// 获取全部用户信息接口返回的数据的ts类型
export interface UserInfoResponseData extends ResponseData {
   data: {
      records: Records,
      total: number,
      size: number,
      current: number,
      pages: number
   }
}

// 一个职位的ts类型
export interface Role {
   id?: number,
   createTime?: string,
   updateTime?: string,
   roleName: string,
   remark: null
}
// 获取职位数据的接口返回的数据的ts类型
export interface RoleInfoResponseData extends ResponseData {
   data: {
      assignRoles: Role[],
      allRolesList: Role[]
   }
}

// 给用户分配职位接口携带参数的ts类型
export interface SetRoleData {
   roleIdList: number[],
   userId: number
}